//
//  LBProgressSlider.m
//  AFNetworking
//
//  Created by LINAICAI on 2018/4/2.
//

#import "LBProgressSlider.h"

@implementation LBProgressSlider
- (instancetype)init
{
    self = [super init];
    if (self) {
        ///定制slider
        CGSize s=CGSizeMake(1, 1);
        UIGraphicsBeginImageContextWithOptions(s, 0, [UIScreen mainScreen].scale);
        UIRectFill(CGRectMake(0, 0, 1, 1));
        UIImage *img=UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        [self setThumbImage:img forState:UIControlStateNormal];
    }
    return self;
}
// 控制slider的宽和高，这个方法才是真正的改变slider滑道的高的
- (CGRect)trackRectForBounds:(CGRect)bounds
{
    return CGRectMake(0, 0, CGRectGetWidth(self.frame), 3);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
